package ru.niir.goodfil.utils.filters;

import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;

public class StorageEnteranceFilter implements Serializable {

    private Date beginDate;

    private Date endDate;

    private int operationType = -1;

    private long goodTypeId = -1;

    private long goodId = -1;

    public StorageEnteranceFilter() {
    }

    public StorageEnteranceFilter(Date beginDate, Date endDate, int operationType, long goodId) {
        this.beginDate = beginDate;
        this.endDate = endDate;
        this.operationType = operationType;
        this.goodId = goodId;
    }

    public Date getBeginDate() {
        if(beginDate == null){
            return null;
        }
        else return new Date(beginDate.getTime());
    }

    public void setBeginDate(Date beginDate) {
        if (beginDate != null) {
            this.beginDate = beginDate;
        } else {
            this.beginDate = null;
        }
    }

    public Date getEndDate() {
        if(endDate == null){
            return null;
        }
        else return new Date(endDate.getTime());
    }

    public void setEndDate(Date endDate) {
        if (endDate != null) {
            this.endDate = endDate;
        } else {
            this.endDate = null;
        }
    }

    public int getOperationType() {
        return operationType;
    }

    public void setOperationType(int operationType) {
        this.operationType = operationType;
    }

    public long getGoodId() {
        return goodId;
    }

    public void setGoodId(long goodId) {
        this.goodId = goodId;
    }

    public long getGoodTypeId() {
        return goodTypeId;
    }

    public void setGoodTypeId(long goodTypeId) {
        this.goodTypeId = goodTypeId;
    }

}
